3.923 \(\int \frac {B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \cos (c+d x)}} \, dx\)

Optimal. Leaf size=228 \[ \frac {2 B \sqrt {a+b} \cot (c+d x) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right )}{a d}-\frac {2 C \sqrt {a+b} \cot (c+d x) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{b};\sin ^{-1}\left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right )}{b d} \]

[Out]

2*B*cot(d*x+c)*EllipticF((a+b*cos(d*x+c))^(1/2)/(a+b)^(1/2)/cos(d*x+c)^(1/2),((-a-b)/(a-b))^(1/2))*(a+b)^(1/2)
*(a*(1-sec(d*x+c))/(a+b))^(1/2)*(a*(1+sec(d*x+c))/(a-b))^(1/2)/a/d-2*C*cot(d*x+c)*EllipticPi((a+b*cos(d*x+c))^
(1/2)/(a+b)^(1/2)/cos(d*x+c)^(1/2),(a+b)/b,((-a-b)/(a-b))^(1/2))*(a+b)^(1/2)*(a*(1-sec(d*x+c))/(a+b))^(1/2)*(a
*(1+sec(d*x+c))/(a-b))^(1/2)/b/d

________________________________________________________________________________________

Rubi [A]  time = 0.39, antiderivative size = 228, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {3029, 3006, 2809, 2816} \[ \frac {2 B \sqrt {a+b} \cot (c+d x) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right )}{a d}-\frac {2 C \sqrt {a+b} \cot (c+d x) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{b};\sin ^{-1}\left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right )}{b d} \]

Antiderivative was successfully verified.

[In]

Int[(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]),x]

[Out]

(2*Sqrt[a + b]*B*Cot[c + d*x]*EllipticF[ArcSin[Sqrt[a + b*Cos[c + d*x]]/(Sqrt[a + b]*Sqrt[Cos[c + d*x]])], -((
a + b)/(a - b))]*Sqrt[(a*(1 - Sec[c + d*x]))/(a + b)]*Sqrt[(a*(1 + Sec[c + d*x]))/(a - b)])/(a*d) - (2*Sqrt[a
+ b]*C*Cot[c + d*x]*EllipticPi[(a + b)/b, ArcSin[Sqrt[a + b*Cos[c + d*x]]/(Sqrt[a + b]*Sqrt[Cos[c + d*x]])], -
((a + b)/(a - b))]*Sqrt[(a*(1 - Sec[c + d*x]))/(a + b)]*Sqrt[(a*(1 + Sec[c + d*x]))/(a - b)])/(b*d)

Rule 2809

Int[Sqrt[(b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Simp[(2*b*Tan
[e + f*x]*Rt[(c + d)/b, 2]*Sqrt[(c*(1 + Csc[e + f*x]))/(c - d)]*Sqrt[(c*(1 - Csc[e + f*x]))/(c + d)]*EllipticP
i[(c + d)/d, ArcSin[Sqrt[c + d*Sin[e + f*x]]/(Sqrt[b*Sin[e + f*x]]*Rt[(c + d)/b, 2])], -((c + d)/(c - d))])/(d
*f), x] /; FreeQ[{b, c, d, e, f}, x] && NeQ[c^2 - d^2, 0] && PosQ[(c + d)/b]

Rule 2816

Int[1/(Sqrt[(d_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Simp[(-2*
Tan[e + f*x]*Rt[(a + b)/d, 2]*Sqrt[(a*(1 - Csc[e + f*x]))/(a + b)]*Sqrt[(a*(1 + Csc[e + f*x]))/(a - b)]*Ellipt
icF[ArcSin[Sqrt[a + b*Sin[e + f*x]]/(Sqrt[d*Sin[e + f*x]]*Rt[(a + b)/d, 2])], -((a + b)/(a - b))])/(a*f), x] /
; FreeQ[{a, b, d, e, f}, x] && NeQ[a^2 - b^2, 0] && PosQ[(a + b)/d]

Rule 3006

Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(c_.) + (d_.)*sin
[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Dist[B/d, Int[Sqrt[c + d*Sin[e + f*x]]/Sqrt[a + b*Sin[e + f*x]], x], x] -
 Dist[(B*c - A*d)/d, Int[1/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]]), x], x] /; FreeQ[{a, b, c, d, e
, f, A, B}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rule 3029

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)
*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[1/b^2, Int[(a + b*Sin[e + f*x])
^(m + 1)*(c + d*Sin[e + f*x])^n*(b*B - a*C + b*C*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m,
 n}, x] && NeQ[b*c - a*d, 0] && EqQ[A*b^2 - a*b*B + a^2*C, 0]

Rubi steps

\begin {align*} \int \frac {B \cos (c+d x)+C \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \cos (c+d x)}} \, dx &=\int \frac {B+C \cos (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \, dx\\ &=B \int \frac {1}{\sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \, dx+C \int \frac {\sqrt {\cos (c+d x)}}{\sqrt {a+b \cos (c+d x)}} \, dx\\ &=\frac {2 \sqrt {a+b} B \cot (c+d x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{a d}-\frac {2 \sqrt {a+b} C \cot (c+d x) \Pi \left (\frac {a+b}{b};\sin ^{-1}\left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{b d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.53, size = 144, normalized size = 0.63 \[ \frac {2 \sqrt {2} \sqrt {\cos (c+d x)} \sqrt {\frac {a+b \cos (c+d x)}{(a+b) (\cos (c+d x)+1)}} \left ((B-C) F\left (\sin ^{-1}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {b-a}{a+b}\right )+2 C \Pi \left (-1;\sin ^{-1}\left (\tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {b-a}{a+b}\right )\right )}{d \sqrt {\cos (c+d x) \sec ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {a+b \cos (c+d x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(Cos[c + d*x]^(3/2)*Sqrt[a + b*Cos[c + d*x]]),x]

[Out]

(2*Sqrt[2]*Sqrt[Cos[c + d*x]]*Sqrt[(a + b*Cos[c + d*x])/((a + b)*(1 + Cos[c + d*x]))]*((B - C)*EllipticF[ArcSi
n[Tan[(c + d*x)/2]], (-a + b)/(a + b)] + 2*C*EllipticPi[-1, ArcSin[Tan[(c + d*x)/2]], (-a + b)/(a + b)]))/(d*S
qrt[a + b*Cos[c + d*x]]*Sqrt[Cos[c + d*x]*Sec[(c + d*x)/2]^2])

________________________________________________________________________________________

fricas [F]  time = 0.86, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (C \cos \left (d x + c\right ) + B\right )} \sqrt {b \cos \left (d x + c\right ) + a} \sqrt {\cos \left (d x + c\right )}}{b \cos \left (d x + c\right )^{2} + a \cos \left (d x + c\right )}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2)/(a+b*cos(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

integral((C*cos(d*x + c) + B)*sqrt(b*cos(d*x + c) + a)*sqrt(cos(d*x + c))/(b*cos(d*x + c)^2 + a*cos(d*x + c)),
 x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )}{\sqrt {b \cos \left (d x + c\right ) + a} \cos \left (d x + c\right )^{\frac {3}{2}}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2)/(a+b*cos(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate((C*cos(d*x + c)^2 + B*cos(d*x + c))/(sqrt(b*cos(d*x + c) + a)*cos(d*x + c)^(3/2)), x)

________________________________________________________________________________________

maple [A]  time = 0.39, size = 197, normalized size = 0.86 \[ \frac {2 \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {a +b \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right ) \left (a +b \right )}}\, \left (\sin ^{2}\left (d x +c \right )\right ) \left (B \EllipticF \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}, \sqrt {-\frac {a -b}{a +b}}\right )-C \EllipticF \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}, \sqrt {-\frac {a -b}{a +b}}\right )+2 C \EllipticPi \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}, -1, \sqrt {-\frac {a -b}{a +b}}\right )\right )}{d \sqrt {a +b \cos \left (d x +c \right )}\, \left (-1+\cos \left (d x +c \right )\right ) \sqrt {\cos \left (d x +c \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2)/(a+b*cos(d*x+c))^(1/2),x)

[Out]

2/d*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)/(a+b*cos(d*x+c))^(1/2)*((a+b*cos(d*x+c))/(1+cos(d*x+c))/(a+b))^(1/2)*sin
(d*x+c)^2*(B*EllipticF((-1+cos(d*x+c))/sin(d*x+c),(-(a-b)/(a+b))^(1/2))-C*EllipticF((-1+cos(d*x+c))/sin(d*x+c)
,(-(a-b)/(a+b))^(1/2))+2*C*EllipticPi((-1+cos(d*x+c))/sin(d*x+c),-1,(-(a-b)/(a+b))^(1/2)))/(-1+cos(d*x+c))/cos
(d*x+c)^(1/2)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right )}{\sqrt {b \cos \left (d x + c\right ) + a} \cos \left (d x + c\right )^{\frac {3}{2}}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(d*x+c)+C*cos(d*x+c)^2)/cos(d*x+c)^(3/2)/(a+b*cos(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

integrate((C*cos(d*x + c)^2 + B*cos(d*x + c))/(sqrt(b*cos(d*x + c) + a)*cos(d*x + c)^(3/2)), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )}{{\cos \left (c+d\,x\right )}^{3/2}\,\sqrt {a+b\,\cos \left (c+d\,x\right )}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*cos(c + d*x) + C*cos(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + b*cos(c + d*x))^(1/2)),x)

[Out]

int((B*cos(c + d*x) + C*cos(c + d*x)^2)/(cos(c + d*x)^(3/2)*(a + b*cos(c + d*x))^(1/2)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {B + C \cos {\left (c + d x \right )}}{\sqrt {a + b \cos {\left (c + d x \right )}} \sqrt {\cos {\left (c + d x \right )}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(d*x+c)+C*cos(d*x+c)**2)/cos(d*x+c)**(3/2)/(a+b*cos(d*x+c))**(1/2),x)

[Out]

Integral((B + C*cos(c + d*x))/(sqrt(a + b*cos(c + d*x))*sqrt(cos(c + d*x))), x)

________________________________________________________________________________________